package com.example.administrator.myapplication.kotlin

/**
 *  @author chenliangzhi
 *  @date  2018/3/22
 *  @describe
 */
class Person constructor(name: String) {
    var name: String? = null
    var age: Int? = null
    var height: Int? = null

    init {
        this.name = name
    }

    constructor(name: String, age: Int) : this(name) {
        this.name = name
        this.age = age
    }

    constructor(name: String, age: Int, height: Int) : this(name, age) {
        this.name = name
        this.age = age
        this.height = height
    }


    override fun toString(): String {
        return "Person(name=$name, age=$age, height=$height)"
    }

}